package com.neuedu.nevserver.controller;

import com.neuedu.nevserver.pojo.RetaBatch;
import com.neuedu.nevserver.pojo.WholBatch;
import com.neuedu.nevserver.service.RetaBatchService;
import com.neuedu.nevserver.vo.ResultVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.Date;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author sjy
 * @since 2025-03-18
 */
@RestController
@RequestMapping("/reta-batch")
@Api(tags="零售商批号管理",description = "提供零售商批号管理API接口")
public class RetaBatchController {

    @Autowired
    private RetaBatchService retaBatchService;

    @PostMapping("/addRetaBatch")
    @ApiOperation("新增批发商批号")
    public ResultVO addRetaBatch(RetaBatch retaBatch) throws Exception{
        retaBatch.setBatchDate(new Date());
        retaBatchService.save(retaBatch);
        return ResultVO.success("新增成功");
    }
}
